<template>
  <div class="kpi-devired-result">
    <el-row :gutter="20">
      <el-col :span="8" align="center" class="result-info">
        运行结果<br />
        <span>成功</span>
      </el-col>
      <el-col :span="16">
        <ul class="tag-scrollbar">
          <li v-for="(item, index) in results" :key="index">
            <h4>
              <el-tooltip effect="dark" :content="item[0]" placement="top" :enterable="false">
                <div class="result-Nm">{{ item[0] }}</div>
              </el-tooltip>
            </h4>
            <p>
              {{ item[1] }}
              <span>{{ item[2] }}</span>
            </p>
          </li>
        </ul>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  props: {
    results: {
      type: Array,
      required: true,
      default: () => []
    }
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="scss">
.kpi-devired-result {
  height: 400px;
  border: 1px solid #ddd;
  .result-info {
    font-size: 16px;
    padding-top: 150px;
    font-weight: bold;
    span {
      font-size: 25px;
      display: inline-block;
      color: #29cc63;
      margin-top: 20px;
    }
  }
  ul {
    height: 400px;
    overflow-y: auto;
    li {
      float: left;
      width: 200px;
      height: 180px;
      margin: 20px;
      padding: 20px;
      box-shadow: 2px 2px 5px #ddd, 2px -2px 5px #ddd, -2px 2px 5px #ddd;
      h4 {
        font-size: 16px;
        .result-Nm {
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
      p {
        font-size: 25px;
        font-weight: bolder;
        height: calc(100% - 40px);
        padding-top: 35px;
        color: $tag-red;
        text-align: center;
        position: relative;
        span {
          font-size: 14px;
          color: #000;
          position: absolute;
          right: 0;
          bottom: 0;
        }
      }
    }
  }
}
</style>
